package com.hundredapp.oa.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * OaUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "oa_worktime", catalog = "oa_demo")
public class OaWorktime implements java.io.Serializable {

	private Integer id;
	private OaClass oaClass;
	private String worktime;
	private Integer createUserId;
	private Timestamp createTime;
	
	/** default constructor */
	public OaWorktime() {
		
	}
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@ManyToOne(cascade ={CascadeType.REFRESH,CascadeType.MERGE,CascadeType.PERSIST},fetch = FetchType.LAZY)
	@JoinColumn(name = "class_id")
	public OaClass getOaClass() {
		return this.oaClass;
	}

	public void setOaClass(OaClass oaClass) {
		this.oaClass = oaClass;
	}
	@Column(name = "worktime")
	public String getWorktime() {
		return worktime;
	}
	public void setWorktime(String worktime) {
		this.worktime = worktime;
	}
	@Column(name = "create_user_id")
	public Integer getCreateUserId() {
		return createUserId;
	}
	public void setCreateUserId(Integer createUserId) {
		this.createUserId = createUserId;
	}
	@Column(name = "create_time", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}
}
